From 5111369c05662f6ecb41fa875ea75e21db141d01 Mon Sep 17 00:00:00 2001 From: Debian Med Packaging Team Date: Thu, 16 Oct 2025 16:15:12 -0400 Subject: [PATCH] fix portability issues that led to Hurd build failures * src/build-system/configure(.ac): - Reflect the Hurd's support for -Wl,rpath,... . * src/connect/ncbi_socket_cxx.cpp, src/connect/ext/ncbi_localnet.c: cope with missing PATH_MAX everywhere, not just under Windows. Author: Aaron M. Ucko Last-Update: 2020-09-19 Gbp-Pq: Name hurd_fixes --- c++/src/build-system/configure | 2 +- c++/src/build-system/configure.ac | 2 +- c++/src/connect/ncbi_localip.c | 2 +- c++/src/connect/ncbi_socket_cxx.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/c++/src/build-system/configure b/c++/src/build-system/configure index 237353c1..4a45de55 100755 --- a/c++/src/build-system/configure +++ b/c++/src/build-system/configure @@ -10946,7 +10946,7 @@ if test -z "$CONF_f_runpath" ; then CONF_f_runpath="-R" ;; linux*:[GI]CC | linux*Clang | *bsd*:GCC | *bsd*Clang | cygwin*:GCC \ - | osf*:GCC ) + | osf*:GCC | gnu*:GCC ) CONF_f_runpath="-Wl,-rpath," ;; irix*:* | linux*:KCC | *:Compaq ) diff --git a/c++/src/build-system/configure.ac b/c++/src/build-system/configure.ac index 67244eb7..0e5fcd08 100644 --- a/c++/src/build-system/configure.ac +++ b/c++/src/build-system/configure.ac @@ -2470,7 +2470,7 @@ if test -z "$CONF_f_runpath" ; then CONF_f_runpath="-R" ;; linux*:[[GI]]CC | linux*Clang | *bsd*:GCC | *bsd*Clang | cygwin*:GCC \ - | osf*:GCC ) + | osf*:GCC | gnu*:GCC ) CONF_f_runpath="-Wl,-rpath," ;; irix*:* | linux*:KCC | *:Compaq ) diff --git a/c++/src/connect/ncbi_localip.c b/c++/src/connect/ncbi_localip.c index a021d89e..d9c8120f 100644 --- a/c++/src/connect/ncbi_localip.c +++ b/c++/src/connect/ncbi_localip.c @@ -68,7 +68,7 @@ # define INADDR_LOOPBACK 0x7F000001 #endif /*!INADDR_LOOPBACK*/ -#if defined(NCBI_OS_MSWIN) && !defined(PATH_MAX) +#if /* defined(NCBI_OS_MSWIN) && */ !defined(PATH_MAX) # ifdef _MAX_PATH # define PATH_MAX _MAX_PATH #else diff --git a/c++/src/connect/ncbi_socket_cxx.cpp b/c++/src/connect/ncbi_socket_cxx.cpp index 9b658656..b1d7ce9e 100644 --- a/c++/src/connect/ncbi_socket_cxx.cpp +++ b/c++/src/connect/ncbi_socket_cxx.cpp @@ -35,7 +35,7 @@ #include "ncbi_assert.h" // no _ASSERT()s, keep clean from xncbi #include #include // for PATH_MAX -#if defined(NCBI_OS_MSWIN) && !defined(PATH_MAX) +#ifndef PATH_MAX # define PATH_MAX 512 // will actually use less than 32 chars #endif // NCBI_OS_MSWIN && !PATH_MAX -- 2.30.2